<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02DOM练习1</title>
</head>
<body>
<h1>我是标题：<span class="s"></span></h1>
<button  onclick="f1()">点击</button>

<hr>

<script>
    function f1(){
        //根据类选择器找到span元素
        let spanE = document.querySelector('.s');
        //设置span元素内的显示文本
        // spanE.innerHTML = '哈哈哈';
        // spanE.innerHTML = '<table border="1px"><tr><td>姓名</td><td>年龄</td><td>傻逼</td></tr>'
    }
</script>
</body>
</html>